//
//  ORArrayItem.m
//  OR_1
//
//  Created by Luboš Kulič on 10/8/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "ORArrayItem.h"


@implementation  XMLParserWorkerArrayData (ORArrayItem)

-(NSUInteger) numberOfValues {
	NSLog(@"ArrayItem::numberOfValues: %@", [subelements count]);
	return [subelements count];
}

-(NSUInteger) numberOfDescriptionItems{
	return 1;
}

-(id<DataItem>) descriptionWithIndex:(id)index{
	return elementName;
}

-(id<DataItem>) valueWithIndex:(id)index{
	NSLog(@"ArrayItem::valueWithIndex: %@, count: %@",index, [subelements count]);
	return [subelements objectAtIndex:[index intValue]]; // TODO castovani id na int
}


-(NSString *) itemType {
	return DataItemTypeArray;	
}

@end
